Skip to content

Fix PHPStan rule level 0 errors in php-ai-client#10990

Closed
westonruter wants to merge 1 commit intoWordPress:trunkfrom
westonruter:fix/php-ai-client-phpstan
Closed

Fix PHPStan rule level 0 errors in php-ai-client#10990
westonruter wants to merge 1 commit intoWordPress:trunkfrom
westonruter:fix/php-ai-client-phpstan

Conversation

@westonruter
Copy link
Member

There are 81 errors being reported by PHPStan in the wp-includes/php-ai-client directory, most of which are in the third-party subdirectory.

This is a follow-up to r61699/8a82e67 from Core-61175 and r61700/52e3c30 from Core-64591.

Output of composer phpstan
 ------ ----------------------------------------------------------------------- 
  Line   wp-includes/php-ai-client/src/Providers/Http/Enums/RequestAuthenticat  
         ionMethod.php                                                          
 ------ ----------------------------------------------------------------------- 
  33     No error with identifier missingType.generics is reported on line 33.  
         at                                                                     
         src/wp-includes/php-ai-client/src/Providers/Http/Enums/RequestAuthent  
         icationMethod.php:33                                                   
 ------ ----------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php       
 ------ ----------------------------------------------------------------------- 
  263    No error to ignore is reported on line 263.                            
         at                                                                     
         src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php:  
         263                                                                    
 ------ ----------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   wp-includes/php-ai-client/third-party/Http/Discovery/ClassDiscovery.p  
         hp                                                                     
 ------ ----------------------------------------------------------------------- 
  24     Class                                                                  
         WordPress\AiClientDependencies\Http\Discovery\Strategy\GeneratedDisco  
         veryStrategy not found.                                                
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/ClassDiscove  
         ry.php:24                                                              
  48     Class                                                                  
         WordPress\AiClientDependencies\Http\Discovery\Strategy\GeneratedDisco  
         veryStrategy not found.                                                
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/ClassDiscove  
         ry.php:48                                                              
  48     Class                                                                  
         WordPress\AiClientDependencies\Http\Discovery\Strategy\GeneratedDisco  
         veryStrategy not found.                                                
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/ClassDiscove  
         ry.php:48                                                              
 ------ ----------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/CommonC  
         lassesStrategy.php                                                     
 ------ ----------------------------------------------------------------------- 
  53     Class WordPress\AiClientDependencies\Buzz\Client\FileGetContents not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Buzz\Client\FileGetContents not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Buzz\Message\ResponseBuilder not  
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Buzz\Message\ResponseBuilder not  
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\GuzzleHttp\Client not found.      
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\GuzzleHttp\Promise\Promise not    
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\GuzzleHttp\Psr7\Request not       
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\GuzzleHttp\Psr7\Request not       
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\GuzzleHttp\Psr7\Request not       
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Artax\Client not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Artax\Client not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Buzz\Client not      
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Buzz\Client not      
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Cake\Client not      
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Cake\Client not      
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle5\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle5\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle6\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle6\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle6\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle6\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle7\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle7\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle7\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\Guzzle7\Client not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\React\Client not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\React\Client not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\React\Client not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Adapter\React\Client not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Client\Curl\Client not       
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Client\Curl\Client not       
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Client\Curl\Client not       
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Client\Curl\Client not       
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Client\HttpAsyncClient not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Client\HttpClient not        
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Client\Socket\Client not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Client\Socket\Client not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Message\MessageFactory not   
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\MessageFactory\DiactorosM  
         essageFactory not found.                                               
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\MessageFactory\DiactorosM  
         essageFactory not found.                                               
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\MessageFactory\GuzzleMess  
         ageFactory not found.                                                  
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\MessageFactory\GuzzleMess  
         ageFactory not found.                                                  
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\MessageFactory\SlimMessag  
         eFactory not found.                                                    
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\MessageFactory\SlimMessag  
         eFactory not found.                                                    
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Message\StreamFactory not    
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\StreamFactory\DiactorosSt  
         reamFactory not found.                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\StreamFactory\DiactorosSt  
         reamFactory not found.                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\StreamFactory\GuzzleStrea  
         mFactory not found.                                                    
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\StreamFactory\GuzzleStrea  
         mFactory not found.                                                    
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\StreamFactory\SlimStreamF  
         actory not found.                                                      
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\StreamFactory\SlimStreamF  
         actory not found.                                                      
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Http\Message\UriFactory not       
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\UriFactory\DiactorosUriFa  
         ctory not found.                                                       
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\UriFactory\DiactorosUriFa  
         ctory not found.                                                       
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\UriFactory\GuzzleUriFacto  
         ry not found.                                                          
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\UriFactory\GuzzleUriFacto  
         ry not found.                                                          
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\UriFactory\SlimUriFactory  
         not found.                                                             
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Http\Message\UriFactory\SlimUriFactory  
         not found.                                                             
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Laminas\Diactoros\Request not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Laminas\Diactoros\Request not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Laminas\Diactoros\Request not     
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Slim\Http\Request not found.      
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Slim\Http\Request not found.      
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class WordPress\AiClientDependencies\Slim\Http\Request not found.      
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Symfony\Component\HttpClient\HttplugCl  
         ient not found.                                                        
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Symfony\Component\HttpClient\HttplugCl  
         ient not found.                                                        
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Symfony\Component\HttpClient\HttplugCl  
         ient not found.                                                        
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Symfony\Component\HttpClient\HttplugCl  
         ient not found.                                                        
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  53     Class                                                                  
         WordPress\AiClientDependencies\Symfony\Component\HttpClient\Psr18Clie  
         nt not found.                                                          
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:53                                              
  69     Class WordPress\AiClientDependencies\Http\Client\HttpClient not        
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:69                                              
  85     Instantiated class                                                     
         WordPress\AiClientDependencies\Buzz\Client\FileGetContents not found.  
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:85                                              
  89     Instantiated class                                                     
         WordPress\AiClientDependencies\Symfony\Component\HttpClient\Psr18Clie  
         nt not found.                                                          
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:89                                              
  97     Class WordPress\AiClientDependencies\Http\Client\HttpClient not        
         found.                                                                 
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:97                                              
  97     Class                                                                  
         WordPress\AiClientDependencies\Symfony\Component\HttpClient\HttplugCl  
         ient not found.                                                        
         🪪  class.notFound                                                     
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Http/Discovery/Strategy/Com  
         monClassesStrategy.php:97                                              
 ------ ----------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------- 
  Line   wp-includes/php-ai-client/third-party/Nyholm/Psr7/Factory/HttplugFact  
         ory.php                                                                
 ------ ----------------------------------------------------------------------- 
  29     Class                                                                  
         WordPress\AiClientDependencies\Nyholm\Psr7\Factory\HttplugFactory      
         implements unknown interface                                           
         WordPress\AiClientDependencies\Http\Message\StreamFactory.             
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Nyholm/Psr7/Factory/Httplug  
         Factory.php:29                                                         
  29     Class                                                                  
         WordPress\AiClientDependencies\Nyholm\Psr7\Factory\HttplugFactory      
         implements unknown interface                                           
         WordPress\AiClientDependencies\Http\Message\UriFactory.                
         💡  Learn more at https://phpstan.org/user-guide/discovering-symbols   
         at                                                                     
         src/wp-includes/php-ai-client/third-party/Nyholm/Psr7/Factory/Httplug  
         Factory.php:29                                                         
 ------ ----------------------------------------------------------------------- 

 [ERROR] Found 81 errors                                                        


Trac ticket: https://core.trac.wordpress.org/ticket/64591

Use of AI Tools

Gemini CLI fixed the issues.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Co-authored-by: gemini-cli  <218195315+gemini-cli@users.noreply.github.com>
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props westonruter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copy link
Member

@JasonTheAdams JasonTheAdams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to bring this into compatibility with PHPStan! Thanks!

pento pushed a commit that referenced this pull request Feb 20, 2026
Developed in #10990

Follow-up to r61699, r61700.

Props westonruter, SirLouen, jason_the_adams.
See #64591, #61175.


git-svn-id: https://develop.svn.wordpress.org/trunk@61712 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Feb 20, 2026
Developed in WordPress/wordpress-develop#10990

Follow-up to r61699, r61700.

Props westonruter, SirLouen, jason_the_adams.
See #64591, #61175.

Built from https://develop.svn.wordpress.org/trunk@61712


git-svn-id: http://core.svn.wordpress.org/trunk@61020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@westonruter
Copy link
Member Author

Committed in r61712 (97e30d9)

- ../../src/wp-includes/SimplePie
- ../../src/wp-includes/sodium_compat
- ../../src/wp-includes/Text
- ../../src/wp-includes/php-ai-client/third-party

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@westonruter @felixarntz should the entire php-ai-client directory be ignored by PHPStan?

I think from the perspective of wordpress-core the entire php-ai-client is external, and while I'm not sure if syncs like #11102 are manual or automatic, I'd assume we don't want to keep clobbering them back into the codebase

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@justlevine wanna open a PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm opening one. There are currently 2,489 errors errors in trunk 😬

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or no, sorry, that was my stale cache apparently.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #11150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants